/**
 * Created by Administrator on 2017/11/16.
 * Copyright 2017-2018 汉威.智慧环保事业部 Limited.
 * All rights reserved.
 */
package com.hw.one.collect.radar.job;

import com.hw.one.collect.mapper.SiteDao;
import com.hw.one.collect.radar.po.RadarSitePo;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Component
public class RadarDataJob {

    @Resource
    private SiteDao siteDao;

    public static Map<String, RadarSitePo> radarSiteMap = new HashMap<>();

    public void start() {
        List<RadarSitePo> radarSitePos = siteDao.selectRadarAndSiteInfo(new HashMap<String, Object>());
        for (RadarSitePo po : radarSitePos) {
            radarSiteMap.put(po.getSNCode(), po);
        }
    }

}
